home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 026-050 / scopedisk46 / mj-pgs / brkpts_t < prev    next >
Text File  |  1995-03-18  |  750b  |  20 lines

  1. PRINT TAB(35)"Breakpoints"
  2. PRINT "this program divides a range into geometrically ascending numbers which are"
  3. PRINT "useful in designating the counts where the color should change in a plot of"
  4. PRINT "a Mandelbrot or Julia set."
  5. DEFINT h,j,l,n:WIDTH 77
  6. PRINT :INPUT "number of breakpoints";n:DIM br(n)
  7. INPUT "lowest and highest counts to consider";l,h:b=h-l:d=EXP(LOG(b)/(n-1))
  8. PRINT :PRINT "breakpoints are:"
  9. br(1)=1:FOR j=2 TO n:br(j)=br(j-1)*d:NEXT
  10. FOR j=1 TO n-1:br(j)=CINT(l+br(j)):IF br(j)<=br(j-1) THEN br(j)=br(j-1)+1
  11. PRINT br(j);:NEXT:br(n)=h-1:PRINT br(n)
  12. PRINT :INPUT"do you want to write a bp file (y/n)";file$
  13. IF file$="y" THEN
  14.   INPUT"name of file";f$
  15.   OPEN f$ FOR OUTPUT AS 1
  16.   FOR j=1 TO n:WRITE#1,br(j):NEXT
  17.   CLOSE#1
  18. END IF
  19. END  
  20.